package com.source.labelAndBarcode.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.source.labelAndBarcode.entity.BarcodeRevoke;
import com.source.labelAndBarcode.mapper.BarcodeRevokeMapper;
import com.source.labelAndBarcode.service.BarcodeRevokeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.source.labelAndBarcode.vo.BarcodeRevokeVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Joey
 * @since 2021-02-23
 */
@Service
public class BarcodeRevokeServiceImpl extends ServiceImpl<BarcodeRevokeMapper, BarcodeRevoke> implements BarcodeRevokeService {

    @Autowired
    BarcodeRevokeMapper revokeMapper;

    @Override
    public List<BarcodeRevokeVo> findAll() {
        return revokeMapper.findAll();
    }

    @Override
    public IPage<BarcodeRevokeVo> findAllOnPagination(Page<BarcodeRevokeVo> page) {
        return revokeMapper.findAllOnPagination(page);
    }

    @Override
    public BarcodeRevokeVo findById(String id) {
        return revokeMapper.findById(id);
    }

    @Override
    public IPage<BarcodeRevokeVo> findByKeyWord(Page<BarcodeRevokeVo> page, String keyWord) {
        return revokeMapper.findByKeyWord(page,"%"+keyWord+"%");
    }
}
